package cn.scxy.bookcity.controller;

import cn.scxy.bookcity.pojo.dto.UserAddDTO;

import cn.scxy.bookcity.service.IUserRegService;
import cn.scxy.bookcity.web.JsonResult;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@RestController
@Slf4j
@Api(tags = "用户注册")
@RequestMapping("/userreg")
public class UserRegController {
    @Autowired
    private IUserRegService service;
    @PostMapping("/reg")
    public JsonResult userReg(UserAddDTO userAddDTO){
        service.insert(userAddDTO);
        return JsonResult.ok();
    }
}
